﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WeForms
{
    class SideBar : FlowLayoutPanel
    {
        public int ViewSpecificButtonsIndex { get; set; }

        public SideBar()
        {
            Padding = new Padding(3, 6, 3, 6);
            FlowDirection = FlowDirection.TopDown;
            WrapContents = false;
        }

        public override Size GetPreferredSize(Size proposedSize)
        {
            return new Size(WeTabTheme.SideBarWidth, proposedSize.Height);
        }

        protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
        {
            base.SetBoundsCore(x, y, WeTabTheme.SideBarWidth, height, specified);
        }

        protected override void OnPaintBackground(PaintEventArgs e)
        {
            base.OnPaintBackground(e);
            e.Graphics.Clear(WeTabTheme.SideBarBackground);
        }
    }
}
